package com.cy.pj.common.pojo;

public class ResponseResult {
    /**响应数据状态 **/
    private Integer State=1;  //1 success,0 exception
    /**状态对应的信息 **/
    private String message="OK";
    /**服务端响应客户端查询的数据**/
    private Object data;

    public ResponseResult(String message){//state=1,message="delete ok"
        this.message=message;
    }
    public ResponseResult(Object data){
        this.data=data;
    }
    public ResponseResult(Throwable e){//出现异常以后可以执行此方法
        this.State=0;
        this.message=e.getMessage();
    }


    public Integer getState() {
        return State;
    }

    public void setState(Integer state) {
        State = state;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
